package com.michael.study.jetpack.module.hint

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
import com.michael.study.jetpack.databinding.ActivityHintBinding
import com.michael.study.jetpack.module.hint.module.bind.IService
import com.michael.study.jetpack.module.hint.module.provider.PlayImp
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.android.synthetic.main.layout_toolbar.*
import javax.inject.Inject

@AndroidEntryPoint
class HintActivity : AppCompatActivity() {

    @Inject lateinit var naviModule: IService
    @Inject lateinit var playImp: PlayImp
    //依赖注入
    @Inject lateinit var thunder: Thunder
    private lateinit var binding : ActivityHintBinding;

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = ActivityHintBinding.inflate(layoutInflater)
        setContentView(binding.root)
        toolbar.title = "Hint"
        thunder.doThunder()
        Log.d("lgq", "onCreate: " + naviModule.eat() + "" + naviModule.javaClass.canonicalName)
        Log.d("lgq", "onCreate: " + playImp.play())
    }
}